package com.linyu.linpicturebackend.common.base;

import java.io.Serializable;
import java.util.Objects;

/**
 * DeleteRequest 分页请求类
 *
 * @author liyang
 * @since 2024/12/15 23:51
 */
public class DeleteRequest implements Serializable {

    /**
     * id
     */
    private Long id;

    private static final long serialVersionUID = 1L;

    public DeleteRequest() {
    }

    public DeleteRequest(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeleteRequest that = (DeleteRequest) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "DeleteRequest{" +
                "id=" + id +
                '}';
    }
}
